<template>
    <view class="department-tree" v-if="data">
        <select-department-tree-item
            v-if="data"
            v-for="(item, index) in data"
            :key="index"
            :activeId="activeId"
            :data="item"
            @selectFn="selectFn"></select-department-tree-item>
        <!-- <select-department-tree-item  :data="data" @selectFn="selectFn"></select-department-tree-item> -->
    </view>
</template>

<script>
import selectDepartmentTreeItem from "@/pages_me/components/select/select-department-tree-item.vue"
export default {
    name: "selectDepartmentTree",
    components: {
        selectDepartmentTreeItem,
    },
    props: {
        data: {
            type: Array,
            default: () => [],
        },
        activeId: {
            type: Number,
            default: 0,
        },
    },
    data() {
        return {}
    },
    methods: {
        selectFn(data) {
            this.$emit("selectFn", data)
        },
    },
}
</script>

<style lang="scss">
.department-tree-item {
}
</style>
